package com.bz.controller;

import com.bz.pojo.User;
import com.bz.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;

@RestController
@RequestMapping("/hello")
//@Import(User.class) //111
public class HelloControler {

    @Autowired
    private User user;


    @Autowired
    private UserService userService;


    @Autowired
    private Calendar calendar;

    @GetMapping("/hello")
    public String hello(){
        System.out.println(user);
        System.out.println("hello day2");
        userService.save("jjjjjjjjjjjjjjjjjjjjjjjj");

        System.out.println(calendar.getTime());

        return "day2 hello";
    }
}
